// commpents/navbar/navbar.js
const app = getApp()
Component({
  properties: {
    navbarData: {   //navbarData   由父页面传递的数据，变量名字自命名
      type: Object,
      value: {},
      observer: function (newVal, oldVal) {}
    },
    bgHeight:Number
  },
  data: {
    height: '',
    //默认值  默认显示左上角
    navbarData: {
      showCapsule: 1
    },
  },
  attached: function () {
    // 定义导航栏的高度   方便对齐
    this.setData({
      status: app.globalData.status,
      navHeight:app.globalData.navHeight
    })
  },
  methods: {
    // 返回上一页面
    _navback() {
      wx.navigateBack()
    },

    setNavSize:function(){
      
    }
  }

}) 